
<div class="content"> <!-- Content start -->
<p id="notice"><%= notice %></p>

<p>
  <b>Grade:</b>
  <%= @grade.grade %>
</p>

<%= link_to 'Editieren', edit_grade_path(@grade) if @user.is_schorsch? %> 
<%= link_to 'Zurück', grades_path %>

<table>
<% @grade.routes.each do |route| %>
<tr>
	<td><%= route.name %></td>
	<td><%= route.build %></td>
	<td><%= route.grade.grade %></td>
	<td><%= route.chain.number %></td>
	<td><%= route.chain.wall.to_s %></td>
	<td><%= route.color.name %></td>
	<td><%= route.workers.collect{|x| x.name}.join(", ") %></td>
	<td><span class="<%= route.existent ? "greenlabel" : "redlabel" %>"><%= route.existent ? "Ja" : "Nein" %></span></td>
	<td><%= display_redo_route(route) %></td>
	<td><%= route.comments.length > 0 ? route.comments.length : "Keine" %></td>
	<td><%= link_to 'Anzeigen', route %></td> 
	<td><% if @user.is_admin? || @user.is_creator?(route) %><%= link_to 'Editieren', edit_route_path(route) %><% end %></td> 
	<td><% if @user.is_admin? %><%= link_to 'Loeschen', route, :confirm => 'Are you sure?', :method => :delete %><% end %></td>
</tr>

<% end %>
</table>


</div>
